home *** CD-ROM | disk | FTP | other *** search
/ USA Bestseller / USA BESTSELLER Vol 1-95 (Hepp-Computer)(1995).iso / e206 / xed.doc < prev    next >
Text File  |  1994-08-24  |  61KB  |  1,546 lines

  1.  
  2.  
  3.                    XED version 1.1b heX EDitor
  4.  
  5.  
  6.              A Unique Hexadecimal/Binary file editor
  7.  
  8.  
  9.               (c) Copyright 1993-94 David L. Dight
  10.                        All Rights Reserved.
  11.  
  12.  
  13.        P.O. Box 280, Kings Cross, N.S.W.  2011  AUSTRALIA
  14.          Fax: +61 2 233 2929,  On CompuServe:100033,2563
  15.            or the Internet davidd@interconnect.com.au
  16.  
  17.  
  18.                                -+-
  19.  
  20.  
  21.                           User's Guide
  22.  
  23.  
  24.                   Revision 1.1.b.2 24-Aug-1994.
  25.  
  26.  
  27.                                -+-
  28.  
  29.  
  30.                             Contents
  31.                             ========
  32.  
  33.     Chapter 1. XED - an overview.
  34.  
  35.     Chapter 2. Features
  36.  
  37.             a) Unlimited file size
  38.             b) Modify file length
  39.             c) Mouse support
  40.             d) EGA/VGA alternate screen modes
  41.             e) Undo and Undo all
  42.             f) Edit entire paragraphs as strings
  43.             g) Bitwise and binary
  44.             h) Create compiler readable data definitions
  45.             i) Online help, ASCII tables and Text filters
  46.             j) Multiple markers
  47.             k) Unassembler
  48.             l) Search and Replace
  49.             m) Additional functions
  50.  
  51.  
  52.     Chapter 3. Command line
  53.  
  54.     Chapter 4. Movement
  55.  
  56.     Chapter 5. Editing
  57.  
  58.     Chapter 6. Other functions and notes
  59.  
  60.             a) Searching
  61.             b) Goto offset
  62.             c) Save
  63.             d) Insert paragraph
  64.             e) Copy paragraph
  65.             f) Delete paragraph
  66.             g) Seven/Eight bit ASCII
  67.             h) File information
  68.             i) DOS shell
  69.             j) Quit
  70.             k) Help menu
  71.             l) Bitwise operations
  72.             m) Binary display/edit
  73.             n) Assignment expressions
  74.             o) Fonts
  75.             p) C data definition creation
  76.             q) ASCII tables
  77.             r) Text filters
  78.             s) Using markers
  79.             t) Using the unassembler
  80.             u) Search and Replace
  81.             v) Defragmenting the edit buffer
  82.  
  83.  
  84.     Chapter 7. Additional Functions in the Registered Version
  85.  
  86.             a) Global search and replace
  87.             b) Goto next/previous change
  88.             c) Change video mode
  89.             d) Edit multiple files
  90.             e) Import file
  91.             f) Save file to a different or new file name
  92.             g) Translate values
  93.             h) Expert mode on/off
  94.             i) Backup flag on/off
  95.             j) Read only on/off
  96.             k) Sound on/off
  97.             l) Upper case hex on/off
  98.             m) Hidden characters on/off
  99.             n) Toggle mouse jump
  100.             o) Change the Border Colour
  101.  
  102.  
  103.     Chapter 8. Program Environment and known limitations.
  104.  
  105.    Appendix A. Keyboard Summary
  106.  
  107.    Appendix B. Notes, Disclaimer
  108.  
  109.  
  110.                                -+-
  111.  
  112.  
  113. Chapter 1. XED - an overview.
  114. =============================
  115.  
  116. XED is a simple to use hex file editor. XED permits binary files
  117. to  be  edited in much the same way as normal text files.  Files
  118. are  initially viewed as containing (bytes/16) paragraphs. Bytes
  119. from  these paragraphs are presented on the screen as hex digits
  120. to left, and as ASCII characters to the right. In this document,
  121. the meaning of "line" and "paragraph" will be the same.
  122.  
  123. Typical  uses include repair  of backup file headers; editing of
  124. string constants in executables; creation or expansion of binary
  125. data  files or  any  other  situations which  require  low-level
  126. modification to a file.
  127.  
  128. Unlike  many other hex editors, XED is not restricted to editing
  129. the  file  as  it appears on the disk. The file is viewed  as  a
  130. stream  of binary characters. This allows you to edit and change
  131. any  binary file. The only restriction to the size of the edited
  132. file is your hard disk capacity.
  133.  
  134. XED  starts  in  hex mode. To toggle over to the  ASCII  window,
  135. press  the  TAB  key. The cursor may be moved  with  the  normal
  136. cursor/page  keys.  A  simple reverse video  block  selects  the
  137. current byte which may be edited on screen. You may also edit an
  138. entire  paragraph by pressing the INS key. If you are  in  ASCII
  139. mode,  the current paragraph can be edited as a string.  In  hex
  140. mode, XED converts the paragraph into a hex string (2 hex digits
  141. per  byte).  The  length of the paragraph can  be  increased  or
  142. decreased.
  143.  
  144. To search, press Shift+F8. Depending on the mode you are in, XED
  145. will  prompt for a hex or an ASCII string. F8 repeats  the  last
  146. search.
  147.  
  148. To move to  specific  offset press F9. Offsets can be entered in
  149. decimal, hex or octal.
  150.  
  151. F4  will save the current file to disk and by default, create  a
  152. backup copy of your original file.
  153.  
  154.  
  155.                                -+-
  156.  
  157.  
  158. Chapter 2. Features.
  159. ====================
  160.  
  161.  2.a) Unlimited file size
  162.  
  163.     XED  can  edit files as big as your disk storage permits.  By
  164.     default,   XED  will  use  extended  memory.   If   that   is
  165.     unavailable or full, expanded memory will be used.  If  again
  166.     this  is  unavailable or full, XED will use the TMP  or  TEMP
  167.     environment  variable to locate the drive  and  directory  to
  168.     store  the file buffer on disk. For small files the hard-disk
  169.     will  never be required. However for larger files, this  will
  170.     be  used.  (A  note: if you use a ramdisk and have  your  TMP
  171.     variable  set  to  that  drive, make sure  you  set  the  TMP
  172.     variable to your hard disk. XED will need about two to  three
  173.     times  the  size of the file in bytes for buffer  storage  on
  174.     the disk).
  175.  
  176.  
  177.  2.b) Modify file length
  178.  
  179.     XED  permits bytes to be inserted or deleted from any  binary
  180.     file.  This  means  that executable files, hidden  files  and
  181.     device  files  can be modified. Of course,  you  should  know
  182.     what  it  is you are editing before attempting to  do  so.  A
  183.     typical  example  may  be  to repair/insert  a  header  in  a
  184.     corrupted backup file. Blank paragraphs and paragraph  copies
  185.     can  also  be  inserted.  XED displays  a  '+'  next  to  any
  186.     paragraph  that is longer than 16 bytes, and a  '-'  next  to
  187.     paragraphs less than 16 bytes.
  188.  
  189.  
  190.  2.c) Mouse support
  191.  
  192.     XED  can  be  used with a mouse. You can click  on  bytes  to
  193.     edit;  scroll the edit window; select paragraphs to be edited
  194.     and  select  commands from a menu. The  use  of  a  mouse  is
  195.     recommended.
  196.  
  197.  
  198.  2.d) EGA/VGA alternate screen modes
  199.  
  200.     XED  will default to the 25 line display. If you have an EGA,
  201.     you can  also use the 43 line  display mode. If  you  have  a
  202.     VGA,  28, 43 or 50 line modes are also available. See the  -l
  203.     option.
  204.  
  205.  
  206.  2.e) Undo and Undo all
  207.  
  208.     When  a paragraph has been modified, XED retains the original
  209.     contents.  The  paragraph may then be undone  at  anytime  by
  210.     pressing  Alt+U.  All  paragraphs that have  changed  can  be
  211.     undone as well by pressing Alt+A. XED displays a '!' next  to
  212.     any paragraph that has changed.
  213.  
  214.  
  215.  2.f) Edit entire paragraphs as strings
  216.  
  217.     An  entire paragraph can be edited as an ASCII string  or  as
  218.     an  ASCII string of hex digits. This permits the insertion or
  219.     deletion   or  modification  of  any  paragraph,   with   any
  220.     character.  The  normal inline editing  functions  are  fully
  221.     supported.  Any  ASCII character that is used  by  XED   (eg.
  222.     TAB) can be entered in hex mode.
  223.  
  224.  
  225.  2.g) Bitwise, binary and assignment expressions
  226.  
  227.     XED supports a number of bitwise operations when in hex mode,
  228.     eg.  shift, rotate and 1's complement.   The current byte can
  229.     be viewed and edited in binary (see Editing/binary display).
  230.  
  231.     Simple assignment expressions can be executed on  the current
  232.     byte. For example, the following expression can be entered to
  233.     switch off the first 3 bits:
  234.  
  235.         [<offset>] &= ~0x7
  236.  
  237.     XED supports the full set of 'C' assignment  operators plus a
  238.     few non 'C' operators. See Section 6.n.
  239.  
  240.  
  241.  2.h) Create compiler readable data definitions
  242.  
  243.     It is often necessary to convert a binary file into a compiler
  244.     readable format. This usually requires a program to be created
  245.     to do the task. XED can  do this for  you by creating 'C' data
  246.     definitions from any file.
  247.  
  248.  
  249.  2.i) Online help, ASCII tables and Text filters
  250.  
  251.     Various help screens are available within XED depending on the
  252.     situation.  A Dec/Hex/Oct/Bin/ASCII table is also provided. An
  253.     additional feature in these tables displays individual charac-
  254.     ter counts for the current file.
  255.  
  256.     XED  allows  you  to  view  the  current  file  through  three
  257.     different text filters, which permits easier comprehension  of
  258.     data in particular editing situations.
  259.  
  260.  
  261.  2.j) Multiple markers
  262.  
  263.     XED permits up to 39 file markers to be set within the current
  264.     file. A mark list window  is also  available for  quicker mark
  265.     retrieval.  Multiple  markers  can be  very useful  if you are
  266.     working on a number of different offsets within the file.  The
  267.     mark list permits easy viewing and retrieval of your marks.
  268.  
  269.  
  270.  2.k) Unassembler
  271.  
  272.     XED permits data to unassembled for viewing. A feature of this
  273.     capability allows you to align starting byte offsets to decode
  274.     various  instructions correctly. The 80x86  family opcodes are
  275.     fully  supported including true  32 bit,  floating point 80x87
  276.     and emulated instructions.
  277.  
  278.  
  279.  2.l) Search and Replace
  280.  
  281.     A limited or global replace can  be made to a file with either
  282.     hex bytes or an ASCII string.
  283.  
  284.  
  285.  2.m) Additional functions
  286.  
  287.     After  the application of your validation key sent to you when
  288.     you  register,  additional  functions will  become   available
  289.     including: 2...n (global) search  and  replace;  import  file;
  290.     translate to  number function;  select alternate  video modes;
  291.     edit multiple files and more.
  292.  
  293.  
  294.                                -+-
  295.  
  296.  
  297. Chapter 3. Command line.
  298. ========================
  299.  
  300.     XED  accepts  the  name of  the file to  edit or a  valid DOS
  301.     wildcard plus a number of switchable options.
  302.  
  303.     An  optional response file can be specified. A response  file
  304.     is   simply  a  text  file  containing  a  list  of  switches
  305.     (including  a filename).  To specify a  response file, prefix
  306.     the response filename with the at '@' character, for example:
  307.  
  308.         xed @myopts
  309.  
  310.     You can debug your response file switches by appending the -h
  311.     switch to the parameter list.  XED will respond with the help
  312.     message, with  your correctly parsed switches  and or  values
  313.     listed in the respective switch 'default' values.
  314.  
  315.     If no file or response file is given, XED will search for the
  316.     default response file "XED.RSP".  If this  file is present in
  317.     the current directory, it will be read.
  318.  
  319.     Response files provide a way  of configuring  XED  yet  still
  320.     permit different files to be edited. For example, the default
  321.     response file could contain your display or backup options or
  322.     other switches you may need, but  not the filename.  XED will
  323.     then read the response file and prompt for the file to edit.
  324.  
  325.     The switches are summarised below:
  326.  
  327.        usage: XED [-abdefghijlmnprstuvx7?!] <[@]file>...
  328.  
  329.        -a start in ASCII mode, default False
  330.        -b make Backup before save, default True
  331.        -d force Disk based virtual memory, default False
  332.        -e Expert mode, default False
  333.        -f use system Font, default False
  334.        -g show system characters, default False
  335.        -h(help) print this Help message, default True
  336.        -i Ignore machine test, default False
  337.        -j enable mouse Jump ("snapto"), default True
  338.        -l <set screen Lines [25 28 43 50]>, default 25
  339.        -m Mono screen, default False
  340.        -n biNary display, default False
  341.        -p disable Pointing device, default False
  342.        -r Read only, default False
  343.        -s enable Sound, default True
  344.        -t <start in Text filter#>, default 1
  345.        -u Display hex bytes using Upper case, default False
  346.        -v <resident Virtual memory (Kb)>, default 128
  347.        -x <eXecute DOS command on startup>
  348.        -7 start with 7 bit ASCII display, default False
  349.        -? print Usage message, default False
  350.        -! about XED
  351.  
  352.  
  353.                                Notes.
  354.     Switches that do not require  a  parameter  can  be  'stacked'
  355.     together on one switch (which can be a '-' or a '/'). The last
  356.     switch stacked can also be a switch that takes a parameter for
  357.     example:
  358.  
  359.             xed -p -f -a -l28 -d myfile.bin
  360.  
  361.     can be regrouped and passed as follows:
  362.  
  363.             xed myfile.bin -pfadl28
  364.  
  365.     The file name can appear any where on the command  line. If a
  366.     file  is not  specified, XED will  prompt  for  the filename.
  367.     Similarly, if a switch that  requires  a  parameter  is given
  368.     without  the parameter,  XED  will prompt you for it.  If the
  369.     filename is omitted, XED will prompt for it last.  If you use
  370.     this method to specify a file you cannot use wildcards.
  371.  
  372.     Notes about each switch follows:
  373.  
  374.    -a    XED  defaults to hex mode on startup. Use this switch  to
  375.          start in ASCII mode.
  376.    -b    By  default,  XED creates a backup of any file  that  has
  377.          been  saved,  in the directory where the  file   resides.
  378.          Use this switch to disable backup creation.
  379.    -d    Forces  XED to use the disk only for buffering. This  may
  380.          be  necessary  if your  extended/expanded memory  is  not
  381.          large  enough to hold the  file buffer. XED will normally
  382.          detect  this  situation anyway.  Use this switch  if  you
  383.          still experience problems.
  384.    -e    Disables yes/no prompts with non-trivial operations.
  385.    -f    Disable   internal   font.  XED  reprograms   the   video
  386.          controller  to  use  a  different text  font.   Use  this
  387.          switch  if characters appear corrupted. CGA  and  certain
  388.          EGA  adaptors will need this switch.  You may also select
  389.          this option if you are examining files  that use some  of
  390.          the redefined font characters.
  391.    -g    By default, XED uses 32 characters in the  font table for
  392.          system  purposes.  These are  not displayed.  This option
  393.          forces XED to display these characters.
  394.    -h    Prints a switch summary with switch descriptions.
  395.    -i    XED  will  only  run  on  PC/AT  or  greater  (386's  and
  396.          greater  are  of course ok).  XED will test your  machine
  397.          to  see  if it conforms.  On some early systems,  machine
  398.          ID's may not be recognised. If this is the case, and your
  399.          system is a 286 or greater, use this switch.
  400.    -j    By default, the mouse cursor will jump to the exit button
  401.          in most windows or to  the scroll characters in  the text
  402.          filter and ASCII tables. After leaving a window, XED will
  403.          move the cursor to the position it was prior to executing
  404.          the command. To disable this, use this switch.
  405.    -l<n> If  you  have an EGA, you can use 43 line mode (eg -l43).
  406.          With VGAs, you can choose from 28, 43 or 50 line modes.
  407.    -m    Force monochrome display attributes.
  408.    -n    When the binary display flag is set, the currently selec-
  409.          ted byte will be displayed in binary at  the far  left of
  410.          the screen (replacing the paragraph offset), see F5.
  411.    -p    XED will use the  mouse by default if present.  The mouse
  412.          can be disabled with this switch.
  413.    -r    The current file cannot be written (read only).
  414.    -s    XED  uses  bleeps  when issuing warning  messages.  These
  415.          can be disabled with this switch.
  416.    -t<n> This switch will force XED to enter the text filter wind-
  417.          ow number n (1-3) on starting.
  418.    -u    By default, XED displays hex digits (A-F) in lower case.
  419.          This  switch  forces upper case.  Hex  offsets are always
  420.          displayed using upper case.
  421.    -v<n> By  default,  XED will use 128Kb of DOS  memory  for  the
  422.          virtual heapspace.  This  can  be  adjusted  to suit your
  423.          memory availability (maximum value is 640).
  424.    -x<s> Execute DOS command on startup.  The  command  string can
  425.          contain  parameters  as  along  as  the  entire string is
  426.          enclosed in double quotes.
  427.    -7    By  default, XED displays the full  8 bit ASCII character
  428.          set. This switch selects 7 bit display.
  429.    -?    Print a short usage message.
  430.    -!    Print the About XED message.
  431.  
  432.  
  433.     Return value
  434.     ------------
  435.  
  436.     XED will return the following values to DOS:
  437.  
  438.         0   -   normal exit, no error.
  439.         1   -   either the file was not found or the response
  440.                 file was not found.
  441.         2   -   XED couldn't initialise the argument parser.
  442.         3   -   the executable XED.EXE is corrupt.
  443.         4   -   insufficient memory to execute.
  444.         5   -   XED couldn't initialise virtual memory.
  445.        +6   -   _vm_errors + 5 if any.
  446.  
  447.  
  448.     !!  if you are interested in the command line argument parsing
  449.         routine used in XED, please contact me on CompuServe or on
  450.         the Internet and I will upload it to you. The routines are
  451.         written in C++  and are a collection of  argument  parsing
  452.         objects. Compiles in DOS/UNIX.
  453.  
  454.  
  455.                                -+-
  456.  
  457.  
  458. Chapter 4. Movement.
  459. ====================
  460.  
  461.     The  cursor keys will locate the software cursor anywhere  on
  462.     the  screen  in  either hex or ASCII modes. The  screen  will
  463.     scroll  one page at a time if up or down are pressed  on  the
  464.     first  or  last  lines respectively. HOME/END  moves  to  the
  465.     first and last byte on the current paragraph. PGUP/PGDN  move
  466.     one  page,  Ctrl+PGUP/PGDN will move 10 pages. Ctrl+HOME  and
  467.     Ctrl+END will move to the first and last paragraph.
  468.  
  469.     If  you  are using the mouse, the scroll bar to the right  of
  470.     the  screen supports mouse activated movement. If  you  click
  471.     on  the  top  or bottom arrows, XED will execute a PGUP/PGDN.
  472.     If  you  hold the button down, XED will continue to page.  If
  473.     you  click  anywhere  on  the  bar,  XED  will  move  to  the
  474.     approximate  position  relative to the  whole  file.  If  you
  475.     click  on the bar position just below the top arrow  or  just
  476.     above  the  bottom  arrow, XED will execute  a  Ctrl+HOME  or
  477.     Ctrl+END.
  478.  
  479.     The relative offset block in the scroll bar  can be moved  by
  480.     clicking the  left button  on  the relative  position in  the
  481.     scroll bar.
  482.  
  483.     The UP/DOWN arrows will scroll the page on the window limits.
  484.  
  485.  
  486.                                -+-
  487.  
  488.  
  489. Chapter 5. Editing.
  490. ===================
  491.  
  492.     A  reverse  video  software  cursor  points  to  the  current
  493.     offset.  The offset is displayed in both hex and  decimal  at
  494.     the  top right of the screen. Moving the cursor or page  keys
  495.     will  relocate  the cursor. If you are using the  mouse,  you
  496.     can  click on any byte to relocate the cursor (if you are  in
  497.     hex  mode you can click on a byte in the ASCII window  -  and
  498.     vice-versa).  Press TAB  to toggle between  the ASCII and hex
  499.     windows.
  500.  
  501.     In  hex mode, you can enter hex digits directly at the cursor
  502.     and  in  ASCII, normal ASCII characters can be  entered.  XED
  503.     will move  the cursor to  the right after a valid  entry.  To
  504.     save the changes you have made to the current paragraph,  you
  505.     must  press ENTER. XED will tag the current paragraph with  a
  506.     '!'.
  507.  
  508.     If  the current  paragraph  has changed but  has not yet  been
  509.     committed (i.e. ENTER has not been pressed),  XED will display
  510.     a '' to left of the Hex display.
  511.  
  512.     When in Hex mode, the following bitwise operations are recogn-
  513.     ized:
  514.  
  515.         press   <   to shift left by 1 bit
  516.           "     L   "  rotate left by 1 bit
  517.           "     >   "  shift right by 1 bit
  518.           "     R   "  rotate right by 1 bit
  519.           "     +   "  increment
  520.           "     -   "  decrement
  521.           "     ~   "  bitwise NOT (1's complement)
  522.           "     `   "  negate (2's complement)
  523.  
  524.     These keys operate on the currently selected byte.
  525.  
  526.     As with any edit, you must press ENTER before moving off  the
  527.     line to keep your changes.
  528.  
  529.     When in Hex mode, the current byte can be  edited  in  binary
  530.     mode by pressing Shift+F5.  (You  must  first  select  binary
  531.     display mode by pressing F5 if you are not in this mode).  If
  532.     you are using the mouse, you  can click on the binary display
  533.     at the left of the screen to edit in binary.
  534.  
  535.     The cursor  will move to the far left of the screen where the
  536.     byte is displayed.  You  may  move the  cursor to any bit and
  537.     enter a 1 or a 0.  The bitwise operator  keys described above
  538.     are  also active. Mouse users can also toggle individual bits
  539.     on or off by  clicking on  any bit.  To save  the byte, press
  540.     ENTER (or click the right button). This will exit from binary
  541.     mode and take you back to Hex mode. To save any binary  edits
  542.     you must press  ENTER again before leaving the line. To abort
  543.     binary editing, press ESCAPE.
  544.  
  545.     'C'  like  assignment expressions can be executed by pressing
  546.     F6.  After  entering  the  expression,  XED  will  update the
  547.     current byte with  the result.  Press  ENTER  to  accept  the
  548.     changes. See section 6.n below for more details.
  549.  
  550.     To  edit  an entire paragraph, press INS. If you are  in  hex
  551.     mode,  the current paragraph will be translated into an ASCII
  552.     string  of  two  digit hex bytes.  This string  can  then  be
  553.     edited on the bottom  line of the screen. XED recognises  the
  554.     usual  in-line  editing keys (such as DEL,  INS,  HOME,  END,
  555.     LEFT,  RIGHT,  BACKSPACE,  and so on).  In  ASCII  mode,  the
  556.     string is presented for editing on the last line.  For inline
  557.     editing help, press F1 (or click on the '?').
  558.  
  559.     Up  to  80  ASCII or 40 hex bytes can be inserted or  deleted
  560.     per  paragraph.  When  in hex mode, two hex digits are needed
  561.     for each byte - bytes that require one hex digit only must be
  562.     entered with a leading '0'.  To save changes you have made to
  563.     the  current paragraph, you must press ENTER. To abort, press
  564.     ESCAPE. XED displays  a  '+' if the paragraph is greater than
  565.     16 bytes, and '-' if it  is  less.  The  new  length  of  the
  566.     paragraph is printed on the bottom line.
  567.  
  568.     If  you  are using the mouse, you can click on the  paragraph
  569.     offset at the left of the screen to edit that paragraph.  The
  570.     cursor can be located within the string using the mouse.
  571.  
  572.     You  may  return  to  an  edited paragraph  and  restore it's
  573.     original   contents   by  pressing   Alt+U.   If   you   then
  574.     subsequently  re-edit  the paragraph,  XED  will  retain  the
  575.     previously  edited paragraph in the undo buffer.  This  means
  576.     you  can  still  lose the original contents! (of  course  you
  577.     don't have to save the file).
  578.  
  579.     Inline  editing is available on any operation that takes  the
  580.     cursor  to  the  bottom line (this includes  whole  paragraph
  581.     edits, search specs and goto  offset). Apart from  the normal
  582.     cursor  keys,  backspace and INS/DEL,  XED  recognises  Alt+D
  583.     (delete to end of line) and F3 (get last edited string).
  584.  
  585.     All  changes  can be undone by pressing Alt+A. Unfortunately,
  586.     this will NOT undo whole paragraph insertions or deletions.
  587.  
  588.     Press  F1  for help or click on the '?' on the top line.  The
  589.     help  screen  can also be used as a menu.  Any command can be
  590.     entered or clicked on from the menu to execute.
  591.  
  592.     If  you click on the filename, XED will execute F10 file info
  593.     function. If you click on the two shutter characters  at  the
  594.     top left. XED will exit.
  595.  
  596.     When in any edit  mode, if  the mouse  location when the left
  597.     button is clicked is not valid, the  left button will execute
  598.     an ESCAPE.  The  mouse buttons default to ESCAPE for the left
  599.     button and ENTER for the right button.
  600.  
  601.  
  602.                                -+-
  603.  
  604.  
  605. Chapter 6. Other functions and notes.
  606. =====================================
  607.  
  608.  6.a) Searching <F8, Shift+F8>
  609.  
  610.     To  search  for  a string or byte, press Shift+F8.  In  ASCII
  611.     mode,  you can enter an ASCII string on the bottom  line.  In
  612.     hex  mode,  you can enter one or more hex digits.  To  search
  613.     again, press F8. You  can  interrupt  a  search  by  pressing
  614.     ESCAPE.
  615.  
  616.     To automatically mark  the search find, press Ctrl+F8 instead
  617.     of F8.  In this  way you  can record  search finds  for later
  618.     review.
  619.  
  620.     The replace function (see 6.u below)  will use the last valid
  621.     search string to search.
  622.  
  623.  
  624.  6.b) Goto offset <F9>
  625.  
  626.     To goto  an offset, press F9. XED will prompt you to enter an
  627.     offset. You can enter the value in Decimal, Hex or Octal, for
  628.     example:
  629.  
  630.             285053      (dec)
  631.             0x4597D     (hex)
  632.             01054575    (oct)
  633.  
  634.     You can also goto  a mark by entering the desired mark number
  635.     prefixed with a '%'.
  636.  
  637.  
  638.  6.c) Save <F4>
  639.  
  640.     To  save the current file press F4. XED will create a  backup
  641.     of  the  current file by default. To disable this, start  XED
  642.     with the -b switch (see above).
  643.  
  644.  
  645.  6.d) Insert paragraph <F2, Ctrl+F2>
  646.  
  647.     F2  will  insert  a blank paragraph (16 bytes  -  all  nulls)
  648.     below  the  current paragraph. Use this to insert  data.  The
  649.     length  of the new paragraph can be modified by editing  (see
  650.     INS  above).  By default XED will prompt you to  confirm  any
  651.     editing  function  such  as insert paragraph.  XED  will  NOT
  652.     prompt in expert mode.
  653.  
  654.     Ctrl+F2 will insert above the current paragraph.
  655.  
  656.  
  657.  6.e) Copy paragraph <F3, Ctrl+F3>
  658.  
  659.     F3 will copy and insert the current paragraph below. To copy
  660.     any  one paragraph to  any other,  edit the source paragraph
  661.     (INS), press ESC, move to the target, press INS then F3. The
  662.     paragraph should  now show the copied values. Press Enter to
  663.     save the change.
  664.  
  665.     Ctrl+F3 will copy and insert above the current paragraph.
  666.  
  667.  
  668.  6.f) Delete paragraph <Shift+F2>
  669.  
  670.     Shift+F2  will  delete  the  current  paragraph regardless of
  671.     whether it  has been  expanded or  shortened.  XED  will  NOT
  672.     prompt in expert mode.
  673.  
  674.  
  675.  6.g) Seven/Eight bit ASCII <F7>
  676.  
  677.     By  default, XED will display ASCII characters (in the  ASCII
  678.     window) as 8 bit characters. To toggle between 7 and  8  bit,
  679.     press F7. Some of the low order ASCII characters and all  the
  680.     high bit characters will displayed as a period '.'
  681.  
  682.  
  683.  6.h) File information <F10>
  684.  
  685.     To  obtain information about the current file, press F10. XED
  686.     will  display  the file size (both on disk  -  in  bytes  and
  687.     paragraphs,  and edit size in bytes), the time/date  of  last
  688.     modification,  any  attributes (A=archive  H=hidden  S=system
  689.     R=read-only) and the number of changes (if any). A change  is
  690.     any  change  to one paragraph. Also calculated and  displayed
  691.     is the file CRC32 and the free disk buffer space.
  692.  
  693.     Mouse  users can  click on the  filename on the first line of
  694.     the screen to execute this command.
  695.  
  696.  
  697.  6.i) DOS shell <Alt+X>
  698.  
  699.     To  start  a DOS shell press Alt+X. XED will swap itself  out
  700.     to expanded/extended memory or to disk if necessary.
  701.  
  702.  
  703.  6.j) Quit <ESC, Shift+F4>
  704.  
  705.     To  exit press ESCAPE. XED will prompt you to confirm. If you
  706.     are  in  expert mode, XED WILL NOT PROMPT, EVEN IF  THE  FILE
  707.     HAS  CHANGED.  Mouse users can click on the button    at  the
  708.     top  left  of the screen to execute this command.  Note:  the
  709.     right  mouse  button defaults to ENTER when in  XED  and  can
  710.     therefore be used for confirmations. Shift+F4 also quits XED.
  711.  
  712.     You can abort while XED is loading a file by pressing 'q'.
  713.  
  714.  
  715.  6.k) Help menu <F1>
  716.  
  717.     Press  F1 for the help screen. Mouse users can click  on  the
  718.     question mark on the top line of the screen. The help  screen
  719.     also doubles as a simple menu.  Any command  can  be  entered
  720.     from the menu. PGUP/PGDN move between the two help screens.
  721.     Mouse  users can  click on   any character  within a  command
  722.     to execute that command.
  723.  
  724.  
  725.  6.l) Bitwise operations
  726.  
  727.     These are available only in  Hex and Binary edit  modes.  See
  728.     Section 5 for more details. To edit in binary, you must first
  729.     select binary display mode by pressing F5.
  730.  
  731.  
  732.  6.m) Binary display and edit <F5, Shift+F5>
  733.  
  734.     F5  toggles  the  binary  display.   When  on,  the currently
  735.     selected byte will be displayed in binary at the far  left of
  736.     the screen (replacing the current paragraph offset).  To edit
  737.     the  current byte in binary,  press  Shift+F5 or click on the
  738.     binary displayed byte.  Mouse users can  click on  individual
  739.     bits in the byte which will toggle the bit on or off.
  740.  
  741.  
  742.  6.n) Assignment expressions <F6>
  743.  
  744.     To enter an assignment expression, press F6. XED will convert
  745.     the current byte to  a simple  assignment expression,  in the
  746.     form:
  747.  
  748.         [<offset>] = 0x<hex byte>
  749.  
  750.     for example:
  751.  
  752.         [4CD0] = 0xe7
  753.  
  754.     You  can  only  edit  the  operator  and  value  parts of the
  755.     expression, which is printed on  the bottom line for editing.
  756.     Use the cursor keys, backspace, etc, to edit  the expression.
  757.     You may enter any  of the standard 'C' assignment  operators.
  758.     The  right value (rval) must be  an integer  constant, in the
  759.     form:
  760.  
  761.         0x??        hex digit(s) (eg. 0xF6, 0x7)
  762.         0???        octal digit(s) (eg. 045)
  763.         ?????       decimal digit(s) (eg. 45)
  764.         ????????b   binary digit(s) (eg. 10101010b, 1100b)
  765.  
  766.     and no subexpressions or parentheses are recognised.
  767.  
  768.     The following 'C' assignment operators are recognised:
  769.  
  770.         a = b    simple assignment
  771.         a += b   plus equals          (a = a + b)
  772.         a -= b   minus equals         (a = a - b)
  773.         a *= b   times equals         (a = a * b)
  774.         a /= b   divide equals        (a = a / b)
  775.         a &= b   bitwise AND equals   (a = a & b)
  776.         a |= b   bitwise OR equals    (a = a | b)
  777.         a ^= b   bitwise XOR equals   (a = a ^ b)
  778.         a %= b   modulus equals       (a = a % b)
  779.         a <<= b  left shift equals    (a = a << b)
  780.         a >>= b  right shift equals   (a = a >> b)
  781.         a <op> ~<b>                 1's complement
  782.  
  783.     and the following non 'C' assignment operators:
  784.  
  785.         a l= b    left rotate equals  (lrot (a, b))
  786.         a r= b    right rotate equals (rrot (a, b))
  787.         a <op> `<b>                  2's complement
  788.  
  789.     The 1's '~' complement operator is also  recognised. This can
  790.     precede any rval, to 'NOT' the value before assignment. A 2's
  791.     complement operator is also available, '`'.  This is used  in
  792.     the same way as  the 1's complement operator, and returns the
  793.     1's  complement  plus 1  (the same as the 'C' '-' unary minus
  794.     (sign change) operator).
  795.  
  796.     When editing  an expression,  you can view a summary  of  the
  797.     expression types by pressing F1 (or click on the '?').
  798.  
  799.     Examples:
  800.  
  801.         [<offset>] |= 0x3           (switch on bits 0-1)
  802.         [<offset>] &= ~0x3          (switch off bits 0-1)
  803.         [<offset>] *= 10            multiply by 10 (dec)
  804.         [<offset>] += 1             increment
  805.         [<offset>] <<= 3            shift left 3 bits
  806.         [<offset>] l= 3             rotate left 3 bits
  807.         [<offset>] ^= 10011b        xor with 0x13
  808.         [<offset>] = `111b          assign 2's complement of 111b
  809.                                     (=0xF9)
  810.         [<offset>] >>= `0376        right shift by the 2's
  811.                                     complement of octal 376 (0xfe)
  812.                                     (=0x2)
  813.  
  814.  
  815.  6.o) Fonts
  816.  
  817.     XED reprograms the video  controller to accommodate both  the
  818.     use of  special characters  and to emulate the graphics mouse
  819.     cursor.  Consequently, certain extended characters  (eg. some
  820.     ruling graphics) will not be displayed  in the  ASCII window.
  821.     In their place, XED will display a small 'x'. In order to see
  822.     these characters, use the -g switch (see section 3).
  823.  
  824.     To force XED to display the default  character  set, use  the
  825.     following command line:
  826.  
  827.         xed -pf <file>
  828.  
  829.     which disables the mouse and uses the system font.
  830.  
  831.     The following characters are reserved by the system:
  832.  
  833.         0x8c 0x8d 0x8e 0x8f 0x90 0x91 0x92 0x93 0x94
  834.         0x95 0x9b 0x9f 0xc7 0xc9 0xcd 0xce 0xcf 0xd0
  835.         0xd1 0xd2 0xd3 0xd4 0xd5 0xd6 0xd7 0xd8 0xdc
  836.         0xf6 0xf7 0xf8 0xff 0x00
  837.  
  838.  
  839.  6.p) C data definition creation <Ctrl+F4>
  840.  
  841.     To create a 'C' data definition using the current file, press
  842.     Ctrl+F4. XED will create the definition to the current  file-
  843.     name with a '.HEX' extension, as in the following example:
  844.  
  845.     typedef struct
  846.     {
  847.         char paragraph[16];
  848.     }
  849.     PARAGRAPH;
  850.  
  851.     PARAGRAPH untitled[] =
  852.     {
  853.         { "\x4d\x5a\xa3\x01\x11\x00\x05\x00\x20\x00\xe1\x02\xff\xff\x5b\x04" },
  854.         { "\x00\x08\x00\x00\x14\x01\x00\x00\x1e\x00\x00\x00\x01\x00\x22\x01" },
  855.             .
  856.             .
  857.             .
  858.         { "\x4d\x5a\xa3" },
  859.     };
  860.  
  861.     For  example,  if the current  file is  MYFILE.BIN, XED  will
  862.     create the definition to the file  MYFILE.HEX.  The  file can
  863.     then be included in your program as a header file.
  864.  
  865.     Note: the  data  generated  after  compilation  may  cause an
  866.     overflow in the data segment if the data  definition  is  too
  867.     large. Check that the data created will fit the target memory
  868.     model.
  869.  
  870.     The text file produced will be approx.  4 to 5 times the size
  871.     of the binary file.
  872.  
  873.     If the length  of  the  last  paragraph is  not 16 bytes, the
  874.     definition will  still compile to  16 bytes in length, padded
  875.     with nulls. You need to be aware of this.  Some compilers may
  876.     require pragmas to align the data on 1 byte boundaries.
  877.  
  878.     To assist  you to incorporate the  definitions generated into
  879.     your  code,  XED will  also generate  the  following  #define
  880.     statements:
  881.  
  882.         #define FILESIZE <size of file in bytes>L
  883.  
  884.             eg. #define FILESIZE 12389L
  885.  
  886.     and:
  887.  
  888.         #define PARAGRAPHS (sizeof(untitled)/sizeof(PARAGRAPH))
  889.  
  890.     which corresponds to the number of 16 byte paragraphs defined.
  891.     If  the  last  paragraph  is  not  16  bytes in  length,  the
  892.     following statement is also produced:
  893.  
  894.         #define BYTES_ON_LAST <bytes on last paragraph>
  895.  
  896.             eg. #define BYTES_ON_LAST 11
  897.  
  898.     See the file COLOURS.HEX  which is an example data definition
  899.     that  was generated by XED. The program file  MKBIN.C  is  an
  900.     example  that  uses   the  definition  file   to   create  an
  901.     executable file called COLOURS.COM.
  902.  
  903.     Since  the output is a text  file, you can of course edit the
  904.     file and  change  the structure or  data layout to  suit your
  905.     needs.
  906.  
  907.     Note:  if you have altered the  length of any  paragraph, you
  908.     must  execute  a  defragment <Alt+M>  before  executing  this
  909.     command.
  910.  
  911.  
  912.  6.q) ASCII tables <Shift+F6>
  913.  
  914.     To view the ASCII tables,  press Shift+F6.  XED  will display
  915.     two columns of 13 bytes. Each byte  is displayed  in decimal,
  916.     hexadecimal, octal, binary and it's ASCII character.  You can
  917.     page through the table with PGUP/PGDN. Mouse users can  click
  918.     on the up/down arrows at the top  right of the window.  Press
  919.     HOME/END to go to the start/end of the table.
  920.  
  921.     Note: the ASCII characters displayed will contain some chara-
  922.     cters used by XED,  which are replaced with a small 'x'.  See
  923.     6.o above.
  924.  
  925.     To see the standard 3 character names for the first 32 chara-
  926.     cters, press F1. Mouse users can click on the word  "Asc"  to
  927.     toggle the name display.
  928.  
  929.     F2 toggles the  binary/character count fields.  The character
  930.     counts are calculated when you run the file info command F10.
  931.     Mouse users can click on the words  "Binary"  or  "Count"  to
  932.     toggle the display.
  933.  
  934.     Character counts can be useful when analysing a  data or text
  935.     file. The counts shown will reflect changes made to the file.
  936.     To update the counters, press F10 then Shift+F6.
  937.  
  938.     F3 will resort  the table  from  lowest to  highest character
  939.     frequencies.  If you press F3 again,  the table will resorted
  940.     back to the default ASCII order. Mouse users can click on the
  941.     words "Dec" to toggle the sort.
  942.  
  943.     To exit, press ESCAPE.
  944.  
  945.  
  946.  6.r) Text filters <Shift+F7>
  947.  
  948.     To view the current file through the text filter, press Shift
  949.     +F7. The current page is displayed as text lines in a window.
  950.     Extended and non-printable characters are  shown as a '.'  By
  951.     default, XED filters all characters below 0x20 (32 dec), only
  952.     displaying CR (0xd),  LF (0xa), EOF (0x1a) and ESC (0x1b)  by
  953.     their string names enclosed in angle brackets, eg <ESC>.   To
  954.     view all the string names (for characters 1 - 32 only), press
  955.     F2. To view strictly text only press F2 again.  F2 will cycle
  956.     through these three types of filter. Mouse users can click on
  957.     the filter number in the window title to execute F2.
  958.  
  959.     The 1 to 32  character  string  name  filter  is  useful  for
  960.     viewing raw data  packets or  other communications  data.  To
  961.     save  space, the name <NUL> (0) is not displayed  since  this
  962.     character is usually the most common in binary files.
  963.  
  964.     XED displays the first character of  each paragraph in  bold,
  965.     allowing you to see the relative position  of the text in the
  966.     file.
  967.  
  968.     XED will  display all  characters from  the current  page and
  969.     possibly some  or  all characters from the next page (to fill
  970.     the text window). Characters from the next page are displayed
  971.     in GREY attribute.
  972.  
  973.     You can scroll  through  the file with PGUP/PGDN. Mouse users
  974.     can click on the arrows at the top right of the text window.
  975.  
  976.     Mouse users can click on any character in the window to go to
  977.     the byte. For this to work properly, select filter number 3.
  978.  
  979.     To exit, press ESCAPE.
  980.  
  981.  
  982.  6.s) Using markers <Shift+F9, Ctrl+F9, F9>
  983.  
  984.     To set a mark at the current offset, press Ctrl+F9.  XED will
  985.     assign the next available mark from a list  of 39.  To remove
  986.     this  mark or  any mark, go to the  marker and  press Ctrl+F9
  987.     again.  To retrieve a mark, press F9 (goto offset)  and enter
  988.     the mark number prefixed with a '%', for example:
  989.  
  990.         Enter offset: %3
  991.  
  992.     will go to  marker number 3.  To view  the  mark list,  press
  993.     Shift+F9. XED will display each mark slot with the offset and
  994.     hex byte at that  offset in bold.  Unused slots  will display
  995.     'free'. Press ESCAPE to exit the list.  Mouse users can click
  996.     on a marker to retrieve (goto) that mark.
  997.  
  998.     When in the mark list window, you can press DEL to remove all
  999.     marks.
  1000.  
  1001.     To retrieve the next mark, press Alt+F10. XED  will go to the
  1002.     next  logical  active mark  (the  next  mark after the   last
  1003.     retrieved or  set).  To  retrieve  the previous  mark,  press
  1004.     Ctrl+F10. This feature is useful  when you wish to work at  a
  1005.     few different offsets.  Set a  mark at  each offset then move
  1006.     between them with these command keys.
  1007.  
  1008.  
  1009.  6.t) Using the unassembler <Shift+F10>
  1010.  
  1011.     The  unassembler  interprets  the 80x86  and   80x87   family
  1012.     instruction set in both 16 and 32 bit modes.
  1013.  
  1014.     To unassemble the current file commencing at the current file
  1015.     offset, press Shift+F10. XED will disassemble as much data as
  1016.     is  necessary to fill the window. PGUP and PGDN move the file
  1017.     pointer one paragraph  which, depending  on the  instructions
  1018.     will decode to on average 10 lines.  Ctrl+PGDN/PGUP will move
  1019.     the file pointer one page (16 * (screen lines - 2)) bytes.
  1020.  
  1021.     XED will  display assembly  lines whose  offsets  begin  on a
  1022.     paragraph  boundary in  bold attribute.  This  permits easier
  1023.     reading of the mnemonics generated.
  1024.  
  1025.     Clearly much of the data will not unassemble correctly. There
  1026.     are a number of reasons for this:
  1027.  
  1028.         a)  The data are not opcodes - they may be program data
  1029.             or perhaps packed/compressed values;
  1030.         b)  The unassembler has commenced disassembly at an odd
  1031.             or incorrect offset;
  1032.         c)  The opcodes are co-processor/emulated instructions, or
  1033.         d)  The opcodes are invalid.
  1034.  
  1035.     When the commencement  offset  is incorrect, the  unassembler
  1036.     will not resolve  instruction sequences properly.  To correct
  1037.     this problem, press LEFT or RIGHT  which will  move the  file
  1038.     offset  back  or forward  one byte.   Alternatively, you  can
  1039.     press ESCAPE to exit the window, reposition the cursor and re
  1040.     -enter the unassembler.  You will often find the instructions
  1041.     are now  correct.  This ability  will permit  disassembly  of
  1042.     packed or  oddly aligned instructions.  Mouse users can click
  1043.     on the left/right arrows on the title line to realign.
  1044.  
  1045.     Ctrl+LEFT  will set the offset  to the start of the paragraph
  1046.     and Ctrl+RIGHT will set the offset to the end (0xf).
  1047.  
  1048.     The title line of the window  will display  the current  view
  1049.     flags. These are:
  1050.  
  1051.        toggle key            on                      off
  1052.  
  1053.        F2       '32' assume 32 bit code       '16' assume 16 bit code
  1054.        F3       'FP' use 80x87 instructions   'EM' use 80x87 emulator
  1055.        F4       'NS' ignore operand sizes     'SZ' show operand sizes
  1056.                  eg. mov [0456],0076           eg. mov word ptr [0456],0076
  1057.        F5       'ND' ignore jump distances    'UD' show jump distances
  1058.                  eg. call 4560:0076            eg.  call far 4560:0076
  1059.  
  1060.     To view 80x87 co-processor instructions (and not their emula-
  1061.     tions - the default), press F3.  To view 32 bit instructions,
  1062.     press F2. To ignore byte/word pointer display,  press F4.  To
  1063.     ignore the distance of calls/jumps, press F5. Mouse users can
  1064.     click on the two letter flag tags on the title line to toggle
  1065.     these flags.
  1066.  
  1067.     Some instructions when expanded may not fit in the window.
  1068.     This is usually due to the operand size/distance, eg.
  1069.  
  1070.             jmp    far word ptr es:[bx+56]
  1071.  
  1072.     These lines will end in a small right hand  arrow. To see the
  1073.     entire instruction sequence, toggle the 'SZ' or 'UD' flags.
  1074.  
  1075.     In 16 bit mode, offsets are  displayed in  the segmented form
  1076.     segment:offset, from the start of the  file.  In 32 bit mode,
  1077.     single (near) 32 bit values are displayed.
  1078.  
  1079.     When the unassembler  cannot interpret  byte  sequences,  XED
  1080.     will   display   the  sequence  followed  by  '<invalid>' and
  1081.     then skip to the  next byte(s).  On a few rare occasions, the
  1082.     unassembler  may get confused and print rubbish, which should
  1083.     be ignored.  This is usually the result  of multi-byte opcode
  1084.     sequences when   the second   or  subsequent   bytes  in  the
  1085.     expected sequence are invalid.
  1086.  
  1087.  
  1088.  6.u) Search and Replace <Ctrl+F7>
  1089.  
  1090.     To replace a string, move to the ASCII window. To replace hex
  1091.     bytes  move to the hex window. Press Ctrl+F7. XED will prompt
  1092.     for a search string and then  a replacement  string.  In this
  1093.     version,  the search  and  replace  strings must  be the same
  1094.     length. Answer 'Y' to replace globally or  enter the  maximum
  1095.     number of replacements to make (registered version only).
  1096.  
  1097.     If you have inserted or deleted  bytes from  the edit buffer,
  1098.     you  must  execute the  defragment edit buffer command  Alt+M
  1099.     before executing a search and replace.
  1100.  
  1101.     See section 6.v for details.
  1102.  
  1103.  
  1104.  6.v) Defragmenting the edit buffer <Alt+M>
  1105.  
  1106.     The ability  to insert and  delete bytes  from any  paragraph
  1107.     presents some problems to other  parts of  the system.  These
  1108.     effects are most noticeable when executing a search.
  1109.  
  1110.     The reason  for these problems can  be found  in the  way XED
  1111.     views the file  as 16 byte paragraphs. If data is inserted or
  1112.     deleted, the effect is only on the edited paragraph. The rest
  1113.     of  the file remains  unchanged (meaning that  offsets do not
  1114.     change to  reflect the insertions  or deletions).  This means
  1115.     that searches will possibly fail. Replaces could fail hard.
  1116.  
  1117.     Another  problem is  that if  you add bytes to the  end  of a
  1118.     paragraph beyond  16 bytes, you  can only view this data with
  1119.     the text filter or when you edit the entire paragraph.
  1120.  
  1121.     It therefore became necessary to provide a function that will
  1122.     reorganise the buffer into 16 byte paragraphs.
  1123.  
  1124.     To execute a buffer defragment, press Alt+M.  If you are  not
  1125.     in expert mode, you will be prompted to confirm the command.
  1126.  
  1127.     XED achieves this operation by recreating the edit buffer. To
  1128.     do this, an  additional amount of buffer  space equivalent to
  1129.     the currently allocated buffer is required.  For example,  if
  1130.     you were  editing a 1 Mb file,  you would need 2-3 Mb  buffer
  1131.     space plus an additional 2-3 Mb.
  1132.  
  1133.     For obvious reasons, a defragment cannot be undone.  You will
  1134.     also lose the existing undo buffer.
  1135.  
  1136.     If you have inserted or deleted bytes to the edit buffer, you
  1137.     MUST execute Alt+M before a search or search and replace.
  1138.  
  1139.  
  1140.                                -+-
  1141.  
  1142.  
  1143. Chapter 7. Additional Functions in the Registered Version.
  1144. ==========================================================
  1145.  
  1146.     After the application of your validation key sent to you when
  1147.     you register, the following functions will become available:
  1148.  
  1149.  
  1150.  7.a) Global search and replace <Ctrl+F7>
  1151.  
  1152.     2...n replacements  can  be made  to the  current  file.  The
  1153.     command can be interrupted by pressing ESCAPE.
  1154.  
  1155.  
  1156.  7.b) Goto next/previous change <Alt+N/Alt+P>
  1157.  
  1158.     This command moves the current file position to  the next  or
  1159.     previous paragraph that has been modified. This is useful for
  1160.     locating edits in a large file.
  1161.  
  1162.  
  1163.  7.c) Change video mode <Alt+V>
  1164.  
  1165.     Allows you to change  video modes  within XED.  Alt+V  cycles
  1166.     through the  25, 28,  43 and  50 line displays.   Shift+Alt+V
  1167.     reverse cycles.  EGA users  can only  move between 25  and 43
  1168.     line modes.
  1169.  
  1170.  
  1171.  7.d) Edit multiple files
  1172.  
  1173.     You may specify  multiple files to edit on  the command  line
  1174.     using wildcards or actual file names. Up to 128 files may  be
  1175.     specified.
  1176.  
  1177.     When you press  ESC to  exit XED, the next  file in the  list
  1178.     will be opened. Shift+F3 will  abort to the  previous file in
  1179.     the list. To abort and exit press Shift+F4.
  1180.  
  1181.  
  1182.  7.e) Import file <Alt+I>
  1183.  
  1184.     This command will prompt you  to enter a valid file name. The
  1185.     file will be read into the edit buffer at the current offset.
  1186.  
  1187.     The file  will be  inserted before the  current byte.  If the
  1188.     current offset is at the  start of  the paragraph,  the  file
  1189.     will be inserted above the current paragraph.
  1190.  
  1191.     After  reading in  the file,  XED will  restructure the  edit
  1192.     buffer.  Consequently, this  operation cannot  be un-done and
  1193.     the contents of the undo buffer will be lost.
  1194.  
  1195.     There  must be at least  three times the  size of the file to
  1196.     read in available in the buffer space.
  1197.  
  1198.  
  1199.  7.f) Save file to a different or new file name <F4, Ctrl+F4>
  1200.  
  1201.     When  you  save  a  file <F4> or  save a file as  a 'C'  data
  1202.     definition <Ctrl+F4> the file name is  presented for editing.
  1203.     You may enter a different or new file name.
  1204.  
  1205.  
  1206.  7.g) Translate values <Ctrl+F1>
  1207.  
  1208.     This command interprets the next eight bytes starting  at the
  1209.     current offset, as the following types:
  1210.  
  1211.     abbrev.  type           bytes      value range
  1212.     ---------------------------------------------------------
  1213.     uc       unsigned char      1      0 to 255
  1214.     us       unsigned short     2      0 to 65,535
  1215.     ul       unsigned long      4      0 to 4,294,967,295
  1216.     f        float              4      3.4E ± 38 (7 digits)
  1217.     d        double             8      1.7E ± 308 (15 digits)
  1218.  
  1219.     The  translated values  are printed  on  the bottom line,
  1220.     using the abbreviations indicated in the table.
  1221.  
  1222.  
  1223.  7.h) Expert mode on/off <Alt+E>
  1224.  
  1225.     Permits Expert mode to be toggled within XED.
  1226.  
  1227.  
  1228.  7.i) Backup flag on/off <Alt+F>
  1229.  
  1230.     Permits the Backup flag to be toggled within XED.
  1231.  
  1232.  
  1233.  7.j) Read only on/off <Alt+R>
  1234.  
  1235.     Permits the Read only flag to be toggled within XED.
  1236.  
  1237.  
  1238.  7.k) Sound on/off <Alt+S>
  1239.  
  1240.     Permits Sound to be toggled within XED.
  1241.  
  1242.  
  1243.  7.l) Upper case hex on/off <Alt+C>
  1244.  
  1245.     Permits either upper or lower case display for hex digits A-F
  1246.     (a-f) to be toggled within XED.
  1247.  
  1248.  
  1249.  7.m) Hidden characters on/off <Alt+H>
  1250.  
  1251.     Normally  hidden  characters can  be displayed  in the  ASCII
  1252.     window.
  1253.  
  1254.  
  1255.  7.n) Toggle mouse jump <Alt+J>
  1256.  
  1257.     By default,  the mouse cursor will jump to the exit button in
  1258.     most windows or to  the scroll characters in  the text filter
  1259.     and ASCII tables.  After leaving a window, XED will move  the
  1260.     cursor to the position it was prior to executing the command.
  1261.  
  1262.  
  1263.  7.o) Change the Border Colour <Alt+B>
  1264.  
  1265.     Cycles  through the  64 border colours.  Shift+Alt+B  reverse
  1266.     cycles. (0=no border).
  1267.  
  1268.  
  1269.                                -+-
  1270.  
  1271.  
  1272. Chapter 8. Program Environment.
  1273. ===============================
  1274.  
  1275.     XED  stores  each  paragraph separately in a  dynamic  linked
  1276.     list.  Paragraphs are stored in virtual memory - some in  DOS
  1277.     memory,  maybe  some  in extended/expanded  memory  and  that
  1278.     which  doesn't  fit in memory is buffered to disk.  XED  will
  1279.     attempt  to  retain paragraphs that are 'near' the  currently
  1280.     selected  paragraph by caching when necessary.  Consequently,
  1281.     operations local  to  the  current  paragraph will be quicker
  1282.     than those at distant offsets and overall performance will be
  1283.     contingent on the capabilities of individual hard drives.
  1284.  
  1285.     Operations  on  large  files (say 3Mb) that  require  XED  to
  1286.     traverse the entire buffer may take longer depending  on  the
  1287.     speed  of  your hard drive. Large files will also  take  some
  1288.     time  to  read into the buffer as XED reads the  ENTIRE  file
  1289.     before editing can begin.
  1290.  
  1291.     XED will use the  TMP or TEMP environment variables to locate
  1292.     the buffer file.  This  drive and directory  must be able  to
  1293.     store at least 3 times the size of the file to edit. RAMDRIVE
  1294.     users may need to reset this variable to their hard drive.
  1295.  
  1296.     XED  has  been  tested on file sizes exceeding 20Mb  and  has
  1297.     performed with  tolerable speed. Windows users please see the
  1298.     files XED.ICO and XED.PIF files included with the release.
  1299.  
  1300.     XED was written in MS C++ 7.00.
  1301.  
  1302.  
  1303.     Known limitations
  1304.     -----------------
  1305.  
  1306.  a) Running under Windows
  1307.  
  1308.     When run  in a  DOS shell,  Windows may object to reading  or
  1309.     writing to the  file you have specified.  Check that you have
  1310.     SHARE installed correctly.
  1311.  
  1312.     To run XED  in a window, you must disable the  mouse and  the
  1313.     video  reprogramming (xed -pf <file>)  as the  windows  mouse
  1314.     conflicts with XED.
  1315.  
  1316.  
  1317.  b) UMB_DRVR driver conflict
  1318.  
  1319.     If you use  UMB_DRVR and  you wish  to use  EMS/XMS with XED,
  1320.     UMB_DRVR  appears  to  conflict and  cause  lock-ups.  To get
  1321.     around this, specify disk-based buffering:
  1322.  
  1323.         xed -d <file>
  1324.  
  1325.  
  1326.  c) Virtual memory errors
  1327.  
  1328.     If for  any  reason during the program's operation a  virtual
  1329.     memory error occurs, XED will display the following message:
  1330.  
  1331.         <error count> _vm errors! Exit and check your TMP/TEMP spec
  1332.  
  1333.     This  error is  generated when an attempt to allocate or free
  1334.     a paragraph in virtual memory fails.
  1335.  
  1336.     If this occurs, exit XED. As described  above, your  TMP spec
  1337.     must  have sufficient  space to handle the edit buffer.  Many
  1338.     operations  such as insert or defragment will use  additional
  1339.     buffer space  which could  take your TMP free space over it's
  1340.     limit. A low  error count  would indicate  this condition.  A
  1341.     larger count usually indicates that insufficient buffer space
  1342.     exists to load the file.
  1343.  
  1344.     Another possible cause of  this error is if the DOS allocated
  1345.     virtual heapspace  is too small.  Try increasing this  value,
  1346.     see -v switch.
  1347.  
  1348.     Note: these errors represent serious problems.  Unpredictable
  1349.     results may arise from any subsequent  editing operation.  In
  1350.     particular you should not attempt to write the current file.
  1351.  
  1352.  
  1353.                                -+-
  1354.  
  1355.  
  1356. Appendix A. Keyboard Summary.
  1357. =============================
  1358.  
  1359.     Key                     Command
  1360.     ---                     -------
  1361.  
  1362.     UP DOWN LEFT RIGHT      Position cursor
  1363.     < > / L R               Shift/Rotate left/right
  1364.     -/+/~/`                 Dec/Inc/NOT/NEG byte
  1365.     ESCAPE                  Quit, open next file (*)
  1366.     ENTER                   Commit changes to paragraph
  1367.     TAB                     Move to ASCII/HEX window
  1368.     Alt+A                   Undo All
  1369.     Alt+B                   Change Border Colour (*)
  1370.     Alt+C                   Upper case hex on/off (*)
  1371.     Alt+E                   Expert mode on/off (*)
  1372.     Alt+F                   Backup flag on/off (*)
  1373.     Alt+H                   Hidden characters on/off (*)
  1374.     Alt+I                   Import file (*)
  1375.     Alt+J                   Mouse jump on/off (*)
  1376.     Alt+N/Alt+P             Goto next/prev change (*)
  1377.     Alt+R                   Read only on/off (*)
  1378.     Alt+S                   Sound on/off (*)
  1379.     Alt+U                   Undo paragraph
  1380.     Alt+V                   Change video mode (*)
  1381.     Alt+X                   DOS shell
  1382.     INS                     Edit paragraph
  1383.     PGDN/UP                 Next/Previous page
  1384.     Ctrl+PGDN/UP            Move +-10 pages
  1385.     F1                      Help/menu
  1386.     Shift+F1                About XED
  1387.     Ctrl+F1                 Translate values (*)
  1388.     F2                      Insert paragraph below
  1389.     Ctrl+F2                 Insert paragraph above
  1390.     Shift+F2                Delete paragraph
  1391.     F3                      Copy paragraph below
  1392.     Ctrl+F3                 Copy paragraph above
  1393.     Shift+F3                Abort edit, open previous file (*)
  1394.     F4                      Save file
  1395.     Ctrl+F4                 Save file as 'C' data
  1396.     F5                      Binary display
  1397.     Shift+F5                Binary edit
  1398.     F6                      Assignment expression
  1399.     Shift+F6                ASCII tables
  1400.     F7                      Toggle 7/8 bit ASCII
  1401.     Shift+F7                Text filters
  1402.     Ctrl+F7                 1...n(*) Search and Replace
  1403.     F8                      Search (again)
  1404.     Shift+F8                Search for...
  1405.     Ctrl+F8                 Search and Set marker
  1406.     F9                      Goto mark or offset
  1407.     Shift+F9                Mark list
  1408.     Ctrl+F9                 Set/Remove mark
  1409.     F10                     File Information
  1410.     Shift+F10               Unassemble
  1411.     Alt+F10                 Goto Next mark
  1412.     Ctrl+F10                Goto Previous mark
  1413.  
  1414.     (*) indicates command is only available in the
  1415.     registered version.
  1416.  
  1417.  
  1418.     Inline editing keys
  1419.     -------------------
  1420.  
  1421.     Key                     Command
  1422.  
  1423.     RIGHT / LEFT            Next/Previous character
  1424.     F3                      Get last edited string (Hex/ASCII)
  1425.     HOME                    Start of line
  1426.     END                     End of line
  1427.     INS                     Toggle insert mode
  1428.     DEL/BS                  Delete character
  1429.     Alt+D                   Erase to end of line
  1430.     Alt+K                   Kill (erase) line, home cursor
  1431.     ENTER                   Accept edits and exit
  1432.     ESCAPE                  Abort edit
  1433.  
  1434.  
  1435.     Keys used in various windows
  1436.     ----------------------------
  1437.  
  1438.     a) Text filters <Shift+F7>
  1439.  
  1440.     PGUP / PGDN             Move to Next/Prev paragraph
  1441.     HOME                    First paragraph
  1442.     END                     Last paragraph
  1443.     F2                      Cycle through the three filter types
  1444.     ESCAPE                  Exit filter
  1445.  
  1446.  
  1447.     b) Unassembler <Shift+F10>
  1448.  
  1449.     PGUP / PGDN             Unassemble from Next/Prev paragraph
  1450.     LEFT / RIGHT            Unassemble from Prev/Next byte in paragraph
  1451.     Ctrl+PGUP/DN            Move to Next/Prev page
  1452.     Ctrl+LEFT/RIGHT         Unassemble from First/Last byte in paragraph
  1453.     HOME                    Unassemble from First paragraph
  1454.     END                     Unassemble from start of Last paragraph
  1455.     F2                      Toggle between 16/32 bit instructions
  1456.     F3                      Toggle between emulated/true '87 instructions
  1457.     F4                      Toggle size operand display
  1458.     F5                      Toggle distance operand display
  1459.     ESCAPE                  Exit unassembler
  1460.  
  1461.  
  1462.     c) ASCII tables <Shift+F6>
  1463.  
  1464.     PGUP / PGDN             Move to Next/Prev page
  1465.     HOME                    First paragraph
  1466.     END                     Last paragraph
  1467.     F1                      Toggle long character name display
  1468.     F2                      Toggle between binary and count display
  1469.     F3                      Sort by character count
  1470.     ESCAPE                  Exit filter
  1471.  
  1472.  
  1473.     d) Mark list <Shift+F9>
  1474.  
  1475.     DEL                     Remove all marks
  1476.  
  1477.  
  1478.     e) Miscellaneous
  1479.  
  1480.     ESCAPE                  Interrupt scan in F10
  1481.       "                     Interrupt Search/Search and Replace
  1482.       "                     Interrupt undo all <Alt+A>
  1483.     'q'                     Abort file load and exit
  1484.  
  1485.  
  1486.                                -+-
  1487.  
  1488.  
  1489. Appendix B. Notes, Disclaimer.
  1490. ==============================
  1491.  
  1492.   Users of XED v1.1b must accept this disclaimer of warranty:
  1493.  
  1494.   "XED IS SUPPLIED AS IS. THE AUTHOR DISCLAIMS ALL  WARRANTIES,
  1495.   EXPRESSED  OR IMPLIED,  INCLUDING,  WITHOUT  LIMITATION,  THE
  1496.   WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE.
  1497.   THE  AUTHOR  ASSUMES  NO  LIABILITY  FOR DAMAGES,  DIRECT  OR
  1498.   CONSEQUENTIAL, WHICH  MAY RESULT FROM  THE USE  OF  XED. GOOD
  1499.   DATA  PROCESSING  PROCEDURE  DICTATES  THAT  ANY  PROGRAM  BE
  1500.   THOROUGHLY  TESTED WITH  NON-CRITICAL DATA  BEFORE RELYING ON
  1501.   IT.  THE USER  MUST ASSUME  THE  ENTIRE  RISK  OF  USING  THE
  1502.   PROGRAM.  ANY  LIABILITY   OF  THE  AUTHOR  WILL  BE  LIMITED
  1503.   EXCLUSIVELY  TO   PRODUCT  REPLACEMENT  OR  REFUND   OF   THE
  1504.   REGISTRATION FEE TO REGISTERED USERS."
  1505.  
  1506.   XED is a "shareware program" and is provided  at no charge to
  1507.   the user for evaluation.  Feel free  to  share  it with  your
  1508.   friends, but please do not give it away altered or as part of
  1509.   another  system. The essence of "user-supported" software  is
  1510.   to  provide  personal computer users  with  quality  software
  1511.   without  high  prices,  and  yet  to  provide  incentive  for
  1512.   programmers to continue to develop new products. If  you find
  1513.   this program  useful and  find  that  you are  using XED  and
  1514.   continue to use XED after  a reasonable  trial period, PLEASE
  1515.   make a registration payment of $15 to DAVID L.DIGHT.
  1516.  
  1517.   Commercial  users of  XED  must  register  and  pay for their
  1518.   copies  of XED  within  30  days of  first use.  Site-Licence
  1519.   arrangements  may  be  made  by contacting  DAVID  L.  DIGHT.
  1520.   Anyone  distributing  XED for any  kind  of remuneration must
  1521.   first  contact  DAVID L. DIGHT  at  the  address   below  for
  1522.   authorisation.  This  authorisation  will  be   automatically
  1523.   granted  to  distributors recognised by  the  Association  of
  1524.   Shareware  Professionals <ASP> as adhering to it's guidelines
  1525.   for  shareware distributors, and such distributors may  begin
  1526.   offering  XED immediately (However DAVID L. DIGHT  must still
  1527.   be advised so  that  the distributor can  be kept  up-to-date
  1528.   with the latest version of XED). Please see the files LICENCE
  1529.   .DOC and DISTRIB.DOC for more information.
  1530.  
  1531.  
  1532.                                -+-
  1533.  
  1534.  
  1535.                        _______
  1536.                   ____|__     |                (R)
  1537.                --|       |    |-------------------
  1538.                  |   ____|__  |  Association of
  1539.                  |  |       |_|  Shareware
  1540.                  |__|   o   |    Professionals
  1541.                -----|   |   |---------------------
  1542.                     |___|___|    MEMBER
  1543.  
  1544.  
  1545.                                -+-
  1546.